package com.wyz.demo02;

public class UserServiceProxy implements UserService{
    UserServiceImpl serviceProxy = new UserServiceImpl();
    @Override
    public void addUser() {
        log("addUser");
        serviceProxy.addUser();
    }

    @Override
    public void deleteUser() {
        log("delete");
        serviceProxy.deleteUser();
    }

    @Override
    public void updateUser() {
        log("update");
        serviceProxy.updateUser();
    }

    @Override
    public void selectUser() {
        log("search");
        serviceProxy.selectUser();
    }

    public void log(String mes){
        System.out.println("debug模式，使用了"+mes+"方法");
    }
}
